From: Dario Faggioli Date: Mon, 11 Apr 2016 16:27:01 +0000 (+0200) Subject: xen: sched: fix spinlock issue in schedule_cpu_switch(). X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~1284 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=8b27d2b8af898597367e2a97aaed3e3404eda5af;p=xen.git xen: sched: fix spinlock issue in schedule_cpu_switch(). Commit 94734ab7c3f5 ("xen: sched: close potential races when switching scheduler to CPUs") buggily replaced a call to pcpu_schedule_lock_irq() with just pcpu_schedule_lock(), causing the relevant irq_safe vs. non-irq_safe ASSERT() in check_lock() to trigger. Fix that. Signed-off-by: Dario Faggioli Acked-by: George Dunlap --- diff --git a/xen/common/schedule.c b/xen/common/schedule.c index 922b035cc2..013e5f142a 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -1702,7 +1702,7 @@ int schedule_cpu_switch(unsigned int cpu, struct cpupool *c) * that the lock itself changed, and retry acquiring the new one (which * will be the correct, remapped one, at that point). */ - old_lock = pcpu_schedule_lock(cpu); + old_lock = pcpu_schedule_lock_irq(cpu); vpriv_old = idle->sched_priv; ppriv_old = per_cpu(schedule_data, cpu).sched_priv;